<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{$title} - {:config('sitename')}</title>
    <meta name="keywords" content="{:config('keywords')}"/>
    <meta name="description" content="{:config('description')}"/>
    <link href="//cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="//cdn.jsdelivr.net/gh/fancyapps/fancybox/dist/jquery.fancybox.min.css" rel="stylesheet">
    <link href="//cdn.jsdelivr.net/npm/simple-line-icons@2.4.1/css/simple-line-icons.css" rel="stylesheet">
    <link href="/Static/css/img.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-fixed-top navbar-default">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">导航按钮</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="./">{:config('sitename')}</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/"><span class="icon-home"></span> 返回首页</a></li>
                <li><a href="/user"><span class="icon-user"></span> 用户中心</a></li>
                <li><a href="/user/img_list"><span class="icon-picture"></span> 图片列表</a></li>
                <li><a href="/user/my_token"><span class="icon-notebook"></span> Token</a></li>
                <li><a href="/user/edit_pass"><span class="icon-settings"></span> 修改密码</a></li>
                <li><a href="javascript:logout();"><span class="icon-power"></span> 退出登录</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="container" style="padding-top:70px;">
    {block name="main"}{/block}
    <div style="margin-bottom: 80px;"></div>
</div>
<footer class="footer">
    <div class="container">
        <div class="col-lg-8 pull-left">
            <p class="text-muted">
                Copyright © {:date("Y", time())} <span class="glyphicon glyphicon-heart" style="color:red;"></span>
                {:config('copy')}
            </p>
        </div>
        <div class="col-lg-4 pull-right">
            <p class="text-muted">
                {:config('footer')}
            </p>
        </div>
    </div>
</footer>
<div class="back-to-top cd-top faa-float animated cd-is-visible" style="top: -900px;"></div>
<script src="//cdn.jsdelivr.net/npm/jquery@2.1.3/dist/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/sentsin/layer/src/layer.js"></script>
<script src="//cdn.jsdelivr.net/npm/jquery-lazyload@1.9.7/jquery.lazyload.js"></script>
<script src="//cdn.jsdelivr.net/npm/bootstrap-fileinput@5.1.2/js/fileinput.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox/dist/jquery.fancybox.min.js"></script>
<script src="/Static/js/img.js"></script>
<script>
    {if !isMobile()}
    $(function () {
        $(".dropdown").mouseover(function () {
            $(this).addClass("open");
        });
        $(".dropdown").mouseleave(function () {
            $(this).removeClass("open");
        });
    });
    {/if}

        function logout() {
            $.ajax({
                url: '/user/logout',
                type: 'post',
                dataType: 'json',
                success: function (res) {
                    layer.alert(res.msg, function () {
                        window.location.href = '/user/login';
                    });
                },
                error: function () {
                    layer.msg('网络错误！');
                }
            });
        }
</script>
{block name="js"}{/block}
</body>
</html>